/**
 * 版权所有 (C), 2019-2019, XXX有限公司
 * 项目名：com.company.study.designpatterns.flyweight
 * 文件名: ConcreteFlyweight
 * 日期: 2019/6/16 10:59
 * 说明:
 */
package com.company.study.designpatterns.flyweight;

/**
 * @author Anbang713
 * @create 2019/6/16
 */
public class ConcreteFlyweight implements Flyweight {
    /**
     * 示例，描述内部状态
     */
    private String intrinsicState;

    /**
     * 构造方法，传入享元对象的内部状态的数据
     */
    public ConcreteFlyweight(String state) {
        this.intrinsicState = state;
    }

    public void operation(String extrinsicState) {
        //具体的功能处理，可能会用到享元内部、外部的状态
    }
}